onDestroyOptionsMenu
Deprecated
androidx.activity.ComponentActivity now implements MenuHost, an interface that allows any component, including your activity itself, to add menu items by calling addMenuProvider without forcing all components through this single method override. Each MenuProvider then provides a consistent, optionally Lifecycle-aware, and modular way to handle menu item selection for the menu items created by that provider. Replace usages of this method with one or more calls to removeMenuProvider in your Activity's onCreate method, whenever it is necessary to remove the individual MenuProvider. If a MenuProvider was added with Lifecycle-awareness, this removal will happen automatically.
Called when this fragment's option menu items are no longer being included in the overall options menu. Receiving this call means that the menu needed to be rebuilt, but this fragment's items were not included in the newly built menu (its onCreateOptionsMenu was not called).